package 分支和循环.分支练习;

import java.util.Scanner;

public class Challenge6 {

    //1.预期目标？
    //2.明天存多少？
    //3.每个5天花多少？
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("目标：");
        int max=sc.nextInt();
        System.out.println("每天：");
        int day=sc.nextInt();
        System.out.println("5天：");
        int pay=sc.nextInt();
        int count=0;//总共储存多少钱
        int tian=0;//天数
        while(true){
            tian++;
            count=count+day;

            if(tian%5==0){//5天
                count=count-pay;
            }

            if(count>=max){
                break;
            }
        }
        System.out.println(tian);
    }
}
